package book_management.user;

import book_management.book.BookList;
import book_management.operation.IOperation;

public abstract class User {
    //用户名
    protected String name;
    //能实现的权限
    protected IOperation[] iOperations;

    //具体实现权限的菜单
    public abstract int menu();

    //根据用户选择的菜单选择相应的操作类
    public void doOperation(int choice, BookList bookList) {
        iOperations[choice-1].work(bookList);
    }
}
